﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FA.FlightAttendant.ViewModel.Controls;
using FA.FlightAttendant.ViewModel.Windows;

namespace FA.FlightAttendant.ViewModel
{
    /// <summary>
    /// View model creation is abstracted within this factory class.
    /// 
    /// This provides the potential to swap out the view-model implementations
    /// using dependency injection if this is desirable in the future.
    /// </summary>
    public class ViewModelFactory
    {
        #region Singleton

        /// <summary>
        /// Singleton instance.
        /// </summary>
        public static ViewModelFactory Instance
        {
            get { return _instance; }
        }
        private static readonly ViewModelFactory _instance = new ViewModelFactory();

        /// <summary>
        /// Private constructor.
        /// </summary>
        private ViewModelFactory() { }

        #endregion

        public ViewModel CreateMainWindowVM()
        {
            return new MainWindowVM();
        }

        public ViewModel CreateManagePluginsVM()
        {
            return new ManagePluginsVM();
        }

        public ViewModel CreateNewSimulatorVM()
        {
            return new NewSimulatorVM();
        }

        public ViewModel CreateListSimulatorsVM()
        {
            return new ListSimulatorsVM();
        }

        public ViewModel CreateSimulatorLogVM()
        {
            return new SimulatorLogVM();
        }
    }
}
